import { Injectable } from '@angular/core';
import { HttpClientService } from '../../../../services/http-client.service';

@Injectable()
export class FundInfoChangeService {

  constructor(
    public httpClient: HttpClientService
  ) { }

  	//判断是否变更注册
	isRegistrationChange(getBody) {
		return this.httpClient.get('/pms/v1/publicissue/checkChange/' + getBody.nFundNo + "?sChangeType=" + getBody.sChangeType);
  }
  
  //变更注册修改信息
	editRegistrationChange(postBody) {
		return this.httpClient.post('/pms/v1/publicissue/changeRegistration', postBody);
	}
	//延期募集
	delayCollect(putBody) {
		return this.httpClient.put('/pms/v1/publicissue/auditInformation', putBody);
	}
	//查询单个产品审核信息
	getSingleCheckInfo(item) {
		return this.httpClient.get('/pms/v1/publicissue/publicissueExamine/' + item.nFundNo);
	}
	// 查询单个产品基础信息
	getSingleProductInfo(item) {
		return this.httpClient.get('/pms/v1/publicissue/publicBasic/' + item.nFundNo);

	}
	// 获取附件树
	getFileTree(getBody) {
		return this.httpClient.get('/pms/v1/common/fundFile/attachTree', getBody);
	}
	// 获取文件历史版本
	getFileHistory(getBody) {
		return this.httpClient.get('/pms/v1/common/fundFile/versions/' + getBody);
	}
	// 删除附件
	delFile(putBody) {
		return this.httpClient.put('/pms/v1/common/fundFile/file/' + putBody);
	}
	// 修改附件名
	changeFileName(nAttachNo, newFileName) {
		return this.httpClient.put('/pms/v1/common/fundFile/file?&nAttachNo=' + nAttachNo + '&attachName=' + newFileName);
	}
	// 基金经理
	getManagerList() {
		return this.httpClient.get('/pms/v1/common/manager/managerList');
	}
	// 获取备案机构、受托人、托管人下拉框值
    getDictionary() {
        return this.httpClient.get('/pms/v1/common/dict/getStrustee?sFundType=1');
    }
}
